
	var box = document.querySelector('.wraper3');
	var ul = document.getElementById('item');
	var Lis = ul.getElementsByTagName('li')
	var leftBtn = document.getElementById('left-btn');
	var rightBtn = document.getElementById('right-btn');
	var opoint = document.querySelector('#opoint');
	//var oLis = opoint.querySelectorAll('li')

	let current = 0;
	rightBtn.onclick = function() {
		animate(Lis[current], {
			opacity: 0
		});

		current++;
		if(current == 4) {
			current = 0
		}
		animate(Lis[current], {
			opacity: 1
		})
		//pointColor(current)
	}

	leftBtn.onclick = function() {
		animate(Lis[current], {
			opacity: 0
		});

		current--;
		if(current == -1) {
			current = 3
		}
		animate(Lis[current], {
			opacity: 1
		})
		//pointColor(current)
	}

	box.timer = setInterval(function() {
		rightBtn.onclick()
	}, 2000)
	box.onmouseenter = function() {
		clearInterval(box.timer)
		//console.log('鼠标进入')
		animate(rightBtn, {
			right: 0
		});
		animate(leftBtn, {
			left: 0
		})
		box.onmousemove = function(evt) {
			//btncolor
			function btnColor(btn) {
			//	    console.log(evt.target)
				if(evt.target == btn) {
					
					btn.style.backgroundColor = "#3EC0A3"
				} else {
					btn.style.backgroundColor = "rgba(250,250,250,0.4)"
				}
			}
    		btnColor(leftBtn);
    		btnColor(rightBtn);
		}
	}
	box.onmouseleave = function() {

		box.timer = setInterval(function() {
			rightBtn.onclick()
		}, 2000)
		//console.log('鼠标移出')
		animate(rightBtn, {
			right: -50
		});
		animate(leftBtn, {
			left: -50
		})

	}

//	function pointColor(current) {
//		for(let i = 0; i < oLis.length; i++) {
//			oLis[i].style.background = 'rgba(250,250,250,1)'
//		}
//		oLis[current].style.background = '#3EC0A3'
//	}
//	pointColor(0)

//	for(let i = 0; i < oLis.length; i++) {
//		oLis[i].onmouseenter = function() {
//			console.log('进入圆点')
//			pointColor(i)
//			animate(Lis[current], {
//				opacity: 0
//			});
//			animate(Lis[i], {
//				opacity: 1
//			});
//			current = i;
//		}
//	}

//}//fn	

